package com.medi.chats.listener;

import com.medi.chats.listener.events.CheckEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class CheckListener implements ApplicationListener<CheckEvent> {
    @Override
    public void onApplicationEvent(CheckEvent event) {
        System.out.println("-----------------");
        Object user = event.getSource();     //CheckEvent构造函数的参数，不可为null
    }
}